﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace KWT.DRG_DIP.API.Migrations
{
    /// <inheritdoc />
    public partial class 质控规则库新增字段ruleResult : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "ruleResult",
                table: "qc_Rules",
                type: "varchar(256)",
                maxLength: 256,
                nullable: false,
                defaultValue: "",
                comment: "表达式结果")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                  name: "ruleJson",
                  table: "qc_Rules",
                  type: "text",
                  maxLength: 256,
                  nullable: false,
                  defaultValue: "",
                  comment: "规则json",
                  oldClrType: typeof(string),
                  oldType: "varchar(256)",
                  oldMaxLength: 256,
                  oldDefaultValue: "",
                  oldComment: "规则json")
                  .Annotation("MySql:CharSet", "utf8mb4")
                  .OldAnnotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ruleResult",
                table: "qc_Rules");
            migrationBuilder.AlterColumn<string>(
                  name: "ruleJson",
                  table: "qc_Rules",
                  type: "varchar(256)",
                  maxLength: 256,
                  nullable: false,
                  defaultValue: "",
                  comment: "规则json",
                  oldClrType: typeof(string),
                  oldType: "text",
                  oldMaxLength: 256,
                  oldDefaultValue: "",
                  oldComment: "规则json")
                  .Annotation("MySql:CharSet", "utf8mb4")
                  .OldAnnotation("MySql:CharSet", "utf8mb4");
        }
    }
}
